package com.hp.service.impl;

import com.github.pagehelper.PageHelper;
import com.hp.entity.UserRole;
import com.hp.mapper.UserRoleMapper;
import com.hp.service.UserRoleService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class UserRoleServiceImpl implements UserRoleService {
    @Autowired
    UserRoleMapper userRoleMapper;
    @Override
    public List<UserRole> queryAll(UserRole userRole, Integer page, Integer limit) {
        PageHelper.startPage(page, limit);
        return userRoleMapper.queryAll(userRole);
    }

    @Override
    public int pass(Integer id) {
        return userRoleMapper.pass(id);
    }

    @Override
    public int nopass(Integer id) {
        return userRoleMapper.nopass(id);
    }
}
